package com.hpin.mlxteacher.my;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;

import com.hpin.mlxteacher.R;
import com.hpin.mlxteacher.adapter.AddressBookAdapter;
import com.hpin.mlxteacher.base.BaseActivity;

/**
 * 通讯录
 * Created by Aaron on 15/7/31.
 */
public class AddressBookActivity extends BaseActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_address_book);

        initWidget();
    }

    private void initWidget() {

        ImageView tv_left = (ImageView) findViewById(R.id.iv_left);
        TextView tv_title = (TextView) findViewById(R.id.tv_title);

        tv_title.setText(getResources().getString(R.string.address_book));

        tv_left.setOnClickListener(this);

        ListView lv_address_book = (ListView) findViewById(R.id.lv_address_book);

        AddressBookAdapter adapter = new AddressBookAdapter(this);
        lv_address_book.setAdapter(adapter);

    }

    @Override
    public void widgetClick(View v) {
        switch (v.getId()) {
            case R.id.iv_left:
                finish();
                break;
        }
    }
}
